package com.sumu.utils;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class HttpUtils {
	public static boolean getNetworkState(Context context){
		ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo info = connectivityManager.getActiveNetworkInfo();
		if(info != null){
			if(info.isConnected()){
				return true;
			}else{
				return false;
			}
		}else{
			return false;
		}
	}
}
